<template>
  <div class="setting">
    <header class="header">
      <van-icon
        class="icon"
        name="arrow-left"
        @click="$emit('changeShowSetting')"
      />
      <div>设置</div>
    </header>
    <div class="content">
      <van-cell @click.stop="$toast('丢了就丢了')" title="账号安全" is-link />
      <van-cell @click.stop="$toast('多看看菜谱才有消息')" title="消息推送" is-link />
      <van-cell @click.stop="$toast('为了你的安全，暂时不开放')" title="视频自动播放" is-link />
      <van-cell @click.stop="$toast('我帮你设置好了')" title="系统权限设置" is-link />
      <van-cell @click.stop="$toast('我相信你能上手')" title="帮助中心" is-link />
      <van-cell @click.stop="$toast('我觉得没有意见')" title="意见反馈" is-link />
      <van-cell @click.stop="$toast('谢谢你的五分好评')" title="给我们打分" is-link />
      <van-cell @click.stop="$toast('不看也罢')" title="用户协议" is-link />
      <van-cell @click.stop="$toast(api.msg)" title="隐私条款" is-link />
      <van-cell @click.stop="$toast('无照经营')" title="证照公示" is-link />
      <van-cell @click.stop="$toast(api.version)" title="版本检测" is-link />
      <van-cell @click.stop="$toast('清除成功')" title="清除缓存" is-link />
      <div class="btn">
        <van-button round color="var(--bgc-yellow)" size="large" @click.stop="logout">退出登录</van-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  methods:{
    logout(){
      localStorage.setItem("token","");
      this.$toast.success("退出成功");
      this.$router.replace("/home");
    }
  }
};
</script>

<style lang="scss" scoped>
.setting {
  width: 100%;
  .header {
    width: 100%;
    height: 0.5rem;
    box-sizing: border-box;
    padding: 0 0.15rem;
    display: flex;
    align-items: center;
    font-size: 0.2rem;
    .icon {
      font-size: 0.25rem;
      margin-right: 0.2rem;
    }
  }
  .content {
    width: 100%;
    .btn {
      width: 90%;
      margin: auto;
      margin-top: 0.2rem;
    }
  }
}
</style>